package pakeage03;

import java.util.Scanner;

public class Judgment {
    public int count;
    public int k = 0;
    public void declareOne(Person p,Computer c){
        count++;

        int pn = p.showhand() ;

        System.out.println(p.name+"选手出拳："+pn);
        int cn = c.showhand();
        System.out.println(c.name+"选手出拳："+cn);
            if(pn == 1 && cn==3 || pn == 2 && cn == 1 ||pn == 3 && cn == 2 ){

                System.out.println(p.name+"选手获得本局胜利。");
                 p.score++;
            }else if(pn == cn){
                k++;
                System.out.println("本局比赛为平局，请继续。");

            } else {
            System.out.println(c.name+"选手获得本局胜利。");
                 c.score++;
        }
        }
    public void declareResult(Person p,Computer c){
        System.out.println("比赛结束，本赛制为三局两胜。平局继续。");
        System.out.println("比赛结果："+p.name+"赢了"+p.score+"局。");
        System.out.println("比赛结果："+c.name+"赢了"+c.score+"局。");
        if(p.score > c.score){
            System.out.println(p.name+"选手不错哟，是个高手!");
        }else{
            System.out.println(p.name+"一般般，继续努力!");
        }

    }
    }


